﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    internal class Prime_Program
    {
        static public bool Prime(int v)
        {
            for (int i = 2; i * i <= v; i++)
            {
                if (v % i == 0) { return false; }
            }
            return true;
        }
        static int Main(string[] args)
        {
            int num = Convert.ToInt32(Console.ReadLine());
            if (num <= 2)
            {
                Console.WriteLine("NULL");
                return 1;
            }
            else
            {
                for (int i = 2; i  <= num; i++)
                {
                    if ((num % i) != 0) continue;
                    if (Prime(i)) Console.WriteLine(i + " ");
                }
                return 1;
            }
        }
    }
}